<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- (c) The University of Glasgow 2006</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998</span><span>
</span><span id="line-3"></span><span class="hs-comment">--</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- The @Class@ datatype</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.Class</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-9"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier">Class</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier">ClassOpItem</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier">ClassATItem</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ATValidityInfo"><span class="hs-identifier">ATValidityInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#ClassMinimalDef"><span class="hs-identifier">ClassMinimalDef</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#DefMethInfo"><span class="hs-identifier">DefMethInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#pprDefMethInfo"><span class="hs-identifier">pprDefMethInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier">FunDep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#pprFundeps"><span class="hs-identifier">pprFundeps</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#pprFunDep"><span class="hs-identifier">pprFunDep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#mkClass"><span class="hs-identifier">mkClass</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#mkAbstractClass"><span class="hs-identifier">mkAbstractClass</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier">classTyVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classArity"><span class="hs-identifier">classArity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier">classKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#className"><span class="hs-identifier">className</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classATs"><span class="hs-identifier">classATs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classATItems"><span class="hs-identifier">classATItems</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier">classTyCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classMethods"><span class="hs-identifier">classMethods</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#classOpItems"><span class="hs-identifier">classOpItems</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classBigSig"><span class="hs-identifier">classBigSig</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classExtraBigSig"><span class="hs-identifier">classExtraBigSig</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classTvsFds"><span class="hs-identifier">classTvsFds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classSCTheta"><span class="hs-identifier">classSCTheta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#classAllSelIds"><span class="hs-identifier">classAllSelIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classSCSelId"><span class="hs-identifier">classSCSelId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classSCSelIds"><span class="hs-identifier">classSCSelIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classMinimalDef"><span class="hs-identifier">classMinimalDef</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#classHasFds"><span class="hs-identifier">classHasFds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Core.Class.html#isAbstractClass"><span class="hs-identifier">isAbstractClass</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier">TyCon</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html"><span class="hs-identifier">GHC.Core.TyCo.Rep</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier">Type</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PredType"><span class="hs-identifier">PredType</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Ppr.html"><span class="hs-identifier">GHC.Core.TyCo.Ppr</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Ppr.html#pprType"><span class="hs-identifier">pprType</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.BooleanFormula.html"><span class="hs-identifier">GHC.Data.BooleanFormula</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.BooleanFormula.html#BooleanFormula"><span class="hs-identifier">BooleanFormula</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.BooleanFormula.html#mkTrue"><span class="hs-identifier">mkTrue</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Data</span></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Class-basic]{@Class@: basic definition}
*                                                                      *
************************************************************************

A @Class@ corresponds to a Greek kappa in the static semantics:
-}</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">data</span><span> </span><span id="Class"><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-var">Class</span></a></span></span><span>
</span><span id="line-53"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Class"><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-var">Class</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-54"></span><span>        </span><span id="classTyCon"><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span class="hs-special">,</span><span>    </span><span class="hs-comment">-- The data type constructor for</span><span>
</span><span id="line-55"></span><span>                                </span><span class="hs-comment">-- dictionaries of this class</span><span>
</span><span id="line-56"></span><span>                                </span><span class="hs-comment">-- See Note [ATyCon for classes] in GHC.Core.TyCo.Rep</span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span>        </span><span id="className"><span class="annot"><span class="annottext">Class -&gt; Name
</span><a href="GHC.Core.Class.html#className"><span class="hs-identifier hs-var hs-var">className</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span>              </span><span class="hs-comment">-- Just the cached name of the TyCon</span><span>
</span><span id="line-59"></span><span>        </span><span id="classKey"><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span class="hs-special">,</span><span>            </span><span class="hs-comment">-- Cached unique of TyCon</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>        </span><span id="classTyVars"><span class="annot"><span class="annottext">Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var hs-var">classTyVars</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>        </span><span class="hs-comment">-- The class kind and type variables;</span><span>
</span><span id="line-62"></span><span>                                        </span><span class="hs-comment">-- identical to those of the TyCon</span><span>
</span><span id="line-63"></span><span>           </span><span class="hs-comment">-- If you want visibility info, look at the classTyCon</span><span>
</span><span id="line-64"></span><span>           </span><span class="hs-comment">-- This field is redundant because it's duplicated in the</span><span>
</span><span id="line-65"></span><span>           </span><span class="hs-comment">-- classTyCon, but classTyVars is used quite often, so maybe</span><span>
</span><span id="line-66"></span><span>           </span><span class="hs-comment">-- it's a bit faster to cache it here</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>        </span><span id="classFunDeps"><span class="annot"><span class="annottext">Class -&gt; [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var hs-var">classFunDeps</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- The functional dependencies</span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>        </span><span id="classBody"><span class="annot"><span class="annottext">Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var hs-var">classBody</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ClassBody"><span class="hs-identifier hs-type">ClassBody</span></a></span><span> </span><span class="hs-comment">-- Superclasses, ATs, methods</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span>     </span><span class="hs-special">}</span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span class="hs-comment">--  | e.g.</span><span>
</span><span id="line-75"></span><span class="hs-comment">--</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- &gt;  class C a b c | a b -&gt; c, a c -&gt; b where...</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">--  Here fun-deps are [([a,b],[c]), ([a,c],[b])]</span><span>
</span><span id="line-79"></span><span class="hs-comment">--</span><span>
</span><span id="line-80"></span><span class="hs-comment">--  - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnRarrow'',</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- For details on above see note [Api annotations] in GHC.Parser.Annotation</span><span>
</span><span id="line-83"></span><span class="hs-keyword">type</span><span> </span><span id="FunDep"><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-var">FunDep</span></a></span></span><span> </span><span id="local-6989586621680836776"><span class="annot"><a href="#local-6989586621680836776"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680836776"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680836776"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-keyword">type</span><span> </span><span id="ClassOpItem"><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier hs-var">ClassOpItem</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#DefMethInfo"><span class="hs-identifier hs-type">DefMethInfo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>        </span><span class="hs-comment">-- Selector function; contains unfolding</span><span>
</span><span id="line-87"></span><span>        </span><span class="hs-comment">-- Default-method info</span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-keyword">type</span><span> </span><span id="DefMethInfo"><span class="annot"><a href="GHC.Core.Class.html#DefMethInfo"><span class="hs-identifier hs-var">DefMethInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#DefMethSpec"><span class="hs-identifier hs-type">DefMethSpec</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span>   </span><span class="hs-comment">-- Nothing                    No default method</span><span>
</span><span id="line-91"></span><span>   </span><span class="hs-comment">-- Just ($dm, VanillaDM)      A polymorphic default method, name $dm</span><span>
</span><span id="line-92"></span><span>   </span><span class="hs-comment">-- Just ($gm, GenericDM ty)   A generic default method, name $gm, type ty</span><span>
</span><span id="line-93"></span><span>   </span><span class="hs-comment">--                              The generic dm type is *not* quantified</span><span>
</span><span id="line-94"></span><span>   </span><span class="hs-comment">--                              over the class variables; ie has the</span><span>
</span><span id="line-95"></span><span>   </span><span class="hs-comment">--                              class variables free</span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span class="hs-keyword">data</span><span> </span><span id="ClassATItem"><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier hs-var">ClassATItem</span></a></span></span><span>
</span><span id="line-98"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ATI"><span class="annot"><a href="GHC.Core.Class.html#ATI"><span class="hs-identifier hs-var">ATI</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>         </span><span class="hs-comment">-- See Note [Associated type tyvar names]</span><span>
</span><span id="line-99"></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ATValidityInfo"><span class="hs-identifier hs-type">ATValidityInfo</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span>                      </span><span class="hs-comment">-- Default associated type (if any) from this template</span><span>
</span><span id="line-101"></span><span>                      </span><span class="hs-comment">-- Note [Associated type defaults]</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-comment">-- | Information about an associated type family default implementation. This</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- is used solely for validity checking.</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- See @Note [Type-checking default assoc decls]@ in &quot;GHC.Tc.TyCl&quot;.</span><span>
</span><span id="line-106"></span><span class="hs-keyword">data</span><span> </span><span id="ATValidityInfo"><span class="annot"><a href="GHC.Core.Class.html#ATValidityInfo"><span class="hs-identifier hs-var">ATValidityInfo</span></a></span></span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NoATVI"><span class="annot"><a href="GHC.Core.Class.html#NoATVI"><span class="hs-identifier hs-var">NoATVI</span></a></span></span><span>               </span><span class="hs-comment">-- Used for associated type families that are imported</span><span>
</span><span id="line-108"></span><span>                         </span><span class="hs-comment">-- from another module, for which we don't need to</span><span>
</span><span id="line-109"></span><span>                         </span><span class="hs-comment">-- perform any validity checking.</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ATVI"><span class="annot"><a href="GHC.Core.Class.html#ATVI"><span class="hs-identifier hs-var">ATVI</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- Used for locally defined associated type families.</span><span>
</span><span id="line-112"></span><span>                         </span><span class="hs-comment">-- The [Type] are the LHS patterns.</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-keyword">type</span><span> </span><span id="ClassMinimalDef"><span class="annot"><a href="GHC.Core.Class.html#ClassMinimalDef"><span class="hs-identifier hs-var">ClassMinimalDef</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Data.BooleanFormula.html#BooleanFormula"><span class="hs-identifier hs-type">BooleanFormula</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-comment">-- Required methods</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-keyword">data</span><span> </span><span id="ClassBody"><span class="annot"><a href="GHC.Core.Class.html#ClassBody"><span class="hs-identifier hs-var">ClassBody</span></a></span></span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="AbstractClass"><span class="annot"><a href="GHC.Core.Class.html#AbstractClass"><span class="hs-identifier hs-var">AbstractClass</span></a></span></span><span>
</span><span id="line-118"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ConcreteClass"><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-var">ConcreteClass</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-119"></span><span>        </span><span class="hs-comment">-- Superclasses: eg: (F a ~ b, F b ~ G a, Eq a, Show b)</span><span>
</span><span id="line-120"></span><span>        </span><span class="hs-comment">-- We need value-level selectors for both the dictionary</span><span>
</span><span id="line-121"></span><span>        </span><span class="hs-comment">-- superclasses and the equality superclasses</span><span>
</span><span id="line-122"></span><span>        </span><span id="cls_sc_theta"><span class="annot"><span class="annottext">ClassBody -&gt; [PredType]
</span><a href="GHC.Core.Class.html#cls_sc_theta"><span class="hs-identifier hs-var hs-var">cls_sc_theta</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PredType"><span class="hs-identifier hs-type">PredType</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- Immediate superclasses,</span><span>
</span><span id="line-123"></span><span>        </span><span id="cls_sc_sel_ids"><span class="annot"><span class="annottext">ClassBody -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var hs-var">cls_sc_sel_ids</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>          </span><span class="hs-comment">-- Selector functions to extract the</span><span>
</span><span id="line-124"></span><span>                                        </span><span class="hs-comment">--   superclasses from a</span><span>
</span><span id="line-125"></span><span>                                        </span><span class="hs-comment">--   dictionary of this class</span><span>
</span><span id="line-126"></span><span>        </span><span class="hs-comment">-- Associated types</span><span>
</span><span id="line-127"></span><span>        </span><span id="cls_ats"><span class="annot"><span class="annottext">ClassBody -&gt; [ClassATItem]
</span><a href="GHC.Core.Class.html#cls_ats"><span class="hs-identifier hs-var hs-var">cls_ats</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier hs-type">ClassATItem</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- Associated type families</span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span>        </span><span class="hs-comment">-- Class operations (methods, not superclasses)</span><span>
</span><span id="line-130"></span><span>        </span><span id="cls_ops"><span class="annot"><span class="annottext">ClassBody -&gt; [ClassOpItem]
</span><a href="GHC.Core.Class.html#cls_ops"><span class="hs-identifier hs-var hs-var">cls_ops</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier hs-type">ClassOpItem</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>  </span><span class="hs-comment">-- Ordered by tag</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span>        </span><span class="hs-comment">-- Minimal complete definition</span><span>
</span><span id="line-133"></span><span>        </span><span id="cls_min_def"><span class="annot"><span class="annottext">ClassBody -&gt; ClassMinimalDef
</span><a href="GHC.Core.Class.html#cls_min_def"><span class="hs-identifier hs-var hs-var">cls_min_def</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ClassMinimalDef"><span class="hs-identifier hs-type">ClassMinimalDef</span></a></span><span>
</span><span id="line-134"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-135"></span><span>    </span><span class="hs-comment">-- TODO: maybe super classes should be allowed in abstract class definitions</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span class="annot"><a href="GHC.Core.Class.html#classMinimalDef"><span class="hs-identifier hs-type">classMinimalDef</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ClassMinimalDef"><span class="hs-identifier hs-type">ClassMinimalDef</span></a></span><span>
</span><span id="line-138"></span><span id="classMinimalDef"><span class="annot"><span class="annottext">classMinimalDef :: Class -&gt; ClassMinimalDef
</span><a href="GHC.Core.Class.html#classMinimalDef"><span class="hs-identifier hs-var hs-var">classMinimalDef</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_min_def :: ClassBody -&gt; ClassMinimalDef
</span><a href="GHC.Core.Class.html#cls_min_def"><span class="hs-identifier hs-var">cls_min_def</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836763"><span class="annot"><span class="annottext">ClassMinimalDef
</span><a href="#local-6989586621680836763"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassMinimalDef
</span><a href="#local-6989586621680836763"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.Core.Class.html#classMinimalDef"><span class="hs-identifier hs-var">classMinimalDef</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassMinimalDef
forall a. BooleanFormula a
</span><a href="GHC.Data.BooleanFormula.html#mkTrue"><span class="hs-identifier hs-var">mkTrue</span></a></span><span> </span><span class="hs-comment">-- TODO: make sure this is the right direction</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-comment">{-
Note [Associated type defaults]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following is an example of associated type defaults:
   class C a where
     data D a r

     type F x a b :: *
     type F p q r = (p,q)-&gt;r    -- Default

Note that

 * The TyCons for the associated types *share type variables* with the
   class, so that we can tell which argument positions should be
   instantiated in an instance decl.  (The first for 'D', the second
   for 'F'.)

 * We can have default definitions only for *type* families,
   not data families

 * In the default decl, the &quot;patterns&quot; should all be type variables,
   but (in the source language) they don't need to be the same as in
   the 'type' decl signature or the class.  It's more like a
   free-standing 'type instance' declaration.

 * HOWEVER, in the internal ClassATItem we rename the RHS to match the
   tyConTyVars of the family TyCon.  So in the example above we'd get
   a ClassATItem of
        ATI F ((x,a) -&gt; b)
   So the tyConTyVars of the family TyCon bind the free vars of
   the default Type rhs

The @mkClass@ function fills in the indirect superclasses.

The SrcSpan is for the entire original declaration.
-}</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.Core.Class.html#mkClass"><span class="hs-identifier hs-type">mkClass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-179"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PredType"><span class="hs-identifier hs-type">PredType</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier hs-type">ClassATItem</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-182"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier hs-type">ClassOpItem</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-183"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ClassMinimalDef"><span class="hs-identifier hs-type">ClassMinimalDef</span></a></span><span>
</span><span id="line-184"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>
</span><span id="line-185"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span id="mkClass"><span class="annot"><span class="annottext">mkClass :: Name
-&gt; [TyVar]
-&gt; [FunDep TyVar]
-&gt; [PredType]
-&gt; [TyVar]
-&gt; [ClassATItem]
-&gt; [ClassOpItem]
-&gt; ClassMinimalDef
-&gt; TyCon
-&gt; Class
</span><a href="GHC.Core.Class.html#mkClass"><span class="hs-identifier hs-var hs-var">mkClass</span></a></span></span><span> </span><span id="local-6989586621680836762"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836762"><span class="hs-identifier hs-var">cls_name</span></a></span></span><span> </span><span id="local-6989586621680836761"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836761"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span> </span><span id="local-6989586621680836760"><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836760"><span class="hs-identifier hs-var">fds</span></a></span></span><span> </span><span id="local-6989586621680836759"><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836759"><span class="hs-identifier hs-var">super_classes</span></a></span></span><span> </span><span id="local-6989586621680836758"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836758"><span class="hs-identifier hs-var">superdict_sels</span></a></span></span><span> </span><span id="local-6989586621680836757"><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836757"><span class="hs-identifier hs-var">at_stuff</span></a></span></span><span>
</span><span id="line-188"></span><span>        </span><span id="local-6989586621680836756"><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836756"><span class="hs-identifier hs-var">op_stuff</span></a></span></span><span> </span><span id="local-6989586621680836755"><span class="annot"><span class="annottext">ClassMinimalDef
</span><a href="#local-6989586621680836755"><span class="hs-identifier hs-var">mindef</span></a></span></span><span> </span><span id="local-6989586621680836754"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680836754"><span class="hs-identifier hs-var">tycon</span></a></span></span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class :: TyCon
-&gt; Name
-&gt; Unique
-&gt; [TyVar]
-&gt; [FunDep TyVar]
-&gt; ClassBody
-&gt; Class
</span><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classKey :: Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var">classKey</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var">nameUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836762"><span class="hs-identifier hs-var">cls_name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-190"></span><span>            </span><span class="annot"><span class="annottext">className :: Name
</span><a href="GHC.Core.Class.html#className"><span class="hs-identifier hs-var">className</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836762"><span class="hs-identifier hs-var">cls_name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-191"></span><span>                </span><span class="hs-comment">-- NB:  tyConName tycon = cls_name,</span><span>
</span><span id="line-192"></span><span>                </span><span class="hs-comment">-- But it takes a module loop to assert it here</span><span>
</span><span id="line-193"></span><span>            </span><span class="annot"><span class="annottext">classTyVars :: [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var">classTyVars</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836761"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-194"></span><span>            </span><span class="annot"><span class="annottext">classFunDeps :: [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var">classFunDeps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836760"><span class="hs-identifier hs-var">fds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-195"></span><span>            </span><span class="annot"><span class="annottext">classBody :: ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ConcreteClass :: [PredType]
-&gt; [TyVar]
-&gt; [ClassATItem]
-&gt; [ClassOpItem]
-&gt; ClassMinimalDef
-&gt; ClassBody
</span><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-196"></span><span>                    </span><span class="annot"><span class="annottext">cls_sc_theta :: [PredType]
</span><a href="GHC.Core.Class.html#cls_sc_theta"><span class="hs-identifier hs-var">cls_sc_theta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836759"><span class="hs-identifier hs-var">super_classes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-197"></span><span>                    </span><span class="annot"><span class="annottext">cls_sc_sel_ids :: [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var">cls_sc_sel_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836758"><span class="hs-identifier hs-var">superdict_sels</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-198"></span><span>                    </span><span class="annot"><span class="annottext">cls_ats :: [ClassATItem]
</span><a href="GHC.Core.Class.html#cls_ats"><span class="hs-identifier hs-var">cls_ats</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836757"><span class="hs-identifier hs-var">at_stuff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-199"></span><span>                    </span><span class="annot"><span class="annottext">cls_ops :: [ClassOpItem]
</span><a href="GHC.Core.Class.html#cls_ops"><span class="hs-identifier hs-var">cls_ops</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836756"><span class="hs-identifier hs-var">op_stuff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-200"></span><span>                    </span><span class="annot"><span class="annottext">cls_min_def :: ClassMinimalDef
</span><a href="GHC.Core.Class.html#cls_min_def"><span class="hs-identifier hs-var">cls_min_def</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassMinimalDef
</span><a href="#local-6989586621680836755"><span class="hs-identifier hs-var">mindef</span></a></span><span>
</span><span id="line-201"></span><span>                </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-202"></span><span>            </span><span class="annot"><span class="annottext">classTyCon :: TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var">classTyCon</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680836754"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.Core.Class.html#mkAbstractClass"><span class="hs-identifier hs-type">mkAbstractClass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-205"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-206"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span>
</span><span id="line-207"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span id="mkAbstractClass"><span class="annot"><span class="annottext">mkAbstractClass :: Name -&gt; [TyVar] -&gt; [FunDep TyVar] -&gt; TyCon -&gt; Class
</span><a href="GHC.Core.Class.html#mkAbstractClass"><span class="hs-identifier hs-var hs-var">mkAbstractClass</span></a></span></span><span> </span><span id="local-6989586621680836752"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836752"><span class="hs-identifier hs-var">cls_name</span></a></span></span><span> </span><span id="local-6989586621680836751"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836751"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span> </span><span id="local-6989586621680836750"><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836750"><span class="hs-identifier hs-var">fds</span></a></span></span><span> </span><span id="local-6989586621680836749"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680836749"><span class="hs-identifier hs-var">tycon</span></a></span></span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class :: TyCon
-&gt; Name
-&gt; Unique
-&gt; [TyVar]
-&gt; [FunDep TyVar]
-&gt; ClassBody
-&gt; Class
</span><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classKey :: Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var">classKey</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var">nameUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836752"><span class="hs-identifier hs-var">cls_name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-211"></span><span>            </span><span class="annot"><span class="annottext">className :: Name
</span><a href="GHC.Core.Class.html#className"><span class="hs-identifier hs-var">className</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836752"><span class="hs-identifier hs-var">cls_name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-212"></span><span>                </span><span class="hs-comment">-- NB:  tyConName tycon = cls_name,</span><span>
</span><span id="line-213"></span><span>                </span><span class="hs-comment">-- But it takes a module loop to assert it here</span><span>
</span><span id="line-214"></span><span>            </span><span class="annot"><span class="annottext">classTyVars :: [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var">classTyVars</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836751"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-215"></span><span>            </span><span class="annot"><span class="annottext">classFunDeps :: [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var">classFunDeps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836750"><span class="hs-identifier hs-var">fds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-216"></span><span>            </span><span class="annot"><span class="annottext">classBody :: ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassBody
</span><a href="GHC.Core.Class.html#AbstractClass"><span class="hs-identifier hs-var">AbstractClass</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-217"></span><span>            </span><span class="annot"><span class="annottext">classTyCon :: TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var">classTyCon</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680836749"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="hs-comment">{-
Note [Associated type tyvar names]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The TyCon of an associated type should use the same variable names as its
parent class. Thus
    class C a b where
      type F b x a :: *
We make F use the same Name for 'a' as C does, and similarly 'b'.

The reason for this is when checking instances it's easier to match
them up, to ensure they match.  Eg
    instance C Int [d] where
      type F [d] x Int = ....
we should make sure that the first and third args match the instance
header.

Having the same variables for class and tycon is also used in checkValidRoles
(in GHC.Tc.TyCl) when checking a class's roles.


************************************************************************
*                                                                      *
\subsection[Class-selectors]{@Class@: simple selectors}
*                                                                      *
************************************************************************

The rest of these functions are just simple selectors.
-}</span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="annot"><a href="GHC.Core.Class.html#classArity"><span class="hs-identifier hs-type">classArity</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>
</span><span id="line-249"></span><span id="classArity"><span class="annot"><span class="annottext">classArity :: Class -&gt; Int
</span><a href="GHC.Core.Class.html#classArity"><span class="hs-identifier hs-var hs-var">classArity</span></a></span></span><span> </span><span id="local-6989586621680836747"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836747"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var hs-var">classTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836747"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-250"></span><span>        </span><span class="hs-comment">-- Could memoise this</span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="annot"><a href="GHC.Core.Class.html#classAllSelIds"><span class="hs-identifier hs-type">classAllSelIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- Both superclass-dictionary and method selectors</span><span>
</span><span id="line-254"></span><span id="classAllSelIds"><span class="annot"><span class="annottext">classAllSelIds :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classAllSelIds"><span class="hs-identifier hs-var hs-var">classAllSelIds</span></a></span></span><span> </span><span id="local-6989586621680836745"><span class="annot"><span class="annottext">c :: Class
</span><a href="#local-6989586621680836745"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_sc_sel_ids :: ClassBody -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var">cls_sc_sel_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836744"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836744"><span class="hs-identifier hs-var">sc_sels</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836744"><span class="hs-identifier hs-var">sc_sels</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; [TyVar] -&gt; [TyVar]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classMethods"><span class="hs-identifier hs-var">classMethods</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836745"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-256"></span><span class="annot"><a href="GHC.Core.Class.html#classAllSelIds"><span class="hs-identifier hs-var">classAllSelIds</span></a></span><span> </span><span id="local-6989586621680836743"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836743"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">classMethods</span><span> </span><span class="hs-identifier">c</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="annot"><a href="GHC.Core.Class.html#classSCSelIds"><span class="hs-identifier hs-type">classSCSelIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-259"></span><span class="hs-comment">-- Both superclass-dictionary and method selectors</span><span>
</span><span id="line-260"></span><span id="classSCSelIds"><span class="annot"><span class="annottext">classSCSelIds :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classSCSelIds"><span class="hs-identifier hs-var hs-var">classSCSelIds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_sc_sel_ids :: ClassBody -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var">cls_sc_sel_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836737"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836737"><span class="hs-identifier hs-var">sc_sels</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836737"><span class="hs-identifier hs-var">sc_sels</span></a></span><span>
</span><span id="line-262"></span><span class="annot"><a href="GHC.Core.Class.html#classSCSelIds"><span class="hs-identifier hs-var">classSCSelIds</span></a></span><span> </span><span id="local-6989586621680836736"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836736"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">classMethods</span><span> </span><span class="hs-identifier">c</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="annot"><a href="GHC.Core.Class.html#classSCSelId"><span class="hs-identifier hs-type">classSCSelId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-265"></span><span class="hs-comment">-- Get the n'th superclass selector Id</span><span>
</span><span id="line-266"></span><span class="hs-comment">-- where n is 0-indexed, and counts</span><span>
</span><span id="line-267"></span><span class="hs-comment">--    *all* superclasses including equalities</span><span>
</span><span id="line-268"></span><span id="classSCSelId"><span class="annot"><span class="annottext">classSCSelId :: Class -&gt; Int -&gt; TyVar
</span><a href="GHC.Core.Class.html#classSCSelId"><span class="hs-identifier hs-var hs-var">classSCSelId</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_sc_sel_ids :: ClassBody -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var">cls_sc_sel_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836735"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836735"><span class="hs-identifier hs-var">sc_sels</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680836734"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680836734"><span class="hs-identifier hs-var">n</span></a></span></span><span>
</span><span id="line-269"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">n</span><span> </span><span class="hs-operator">&gt;=</span><span> </span><span class="hs-number">0</span><span> </span><span class="hs-operator">&amp;&amp;</span><span> </span><span class="hs-identifier">lengthExceeds</span><span> </span><span class="hs-identifier">sc_sels</span><span> </span><span class="hs-identifier">n</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-270"></span><span>    </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836735"><span class="hs-identifier hs-var">sc_sels</span></a></span><span> </span><span class="annot"><span class="annottext">[TyVar] -&gt; Int -&gt; TyVar
forall a. [a] -&gt; Int -&gt; a
</span><a href="../../base/src/GHC.List.html#%21%21"><span class="hs-operator hs-var">!!</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680836734"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.Core.Class.html#classSCSelId"><span class="hs-identifier hs-var">classSCSelId</span></a></span><span> </span><span id="local-6989586621680836731"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836731"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621680836730"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680836730"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; TyVar
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;classSCSelId&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836731"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680836730"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="annot"><a href="GHC.Core.Class.html#classMethods"><span class="hs-identifier hs-type">classMethods</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-274"></span><span id="classMethods"><span class="annot"><span class="annottext">classMethods :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classMethods"><span class="hs-identifier hs-var hs-var">classMethods</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_ops :: ClassBody -&gt; [ClassOpItem]
</span><a href="GHC.Core.Class.html#cls_ops"><span class="hs-identifier hs-var">cls_ops</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836726"><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836726"><span class="hs-identifier hs-var">op_stuff</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680836725"><span class="hs-identifier hs-var">op_sel</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680836725"><span class="annot"><span class="annottext">TyVar
</span><a href="#local-6989586621680836725"><span class="hs-identifier hs-var">op_sel</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DefMethInfo
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836726"><span class="hs-identifier hs-var">op_stuff</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-276"></span><span class="annot"><a href="GHC.Core.Class.html#classMethods"><span class="hs-identifier hs-var">classMethods</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.Core.Class.html#classOpItems"><span class="hs-identifier hs-type">classOpItems</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier hs-type">ClassOpItem</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-279"></span><span id="classOpItems"><span class="annot"><span class="annottext">classOpItems :: Class -&gt; [ClassOpItem]
</span><a href="GHC.Core.Class.html#classOpItems"><span class="hs-identifier hs-var hs-var">classOpItems</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_ops :: ClassBody -&gt; [ClassOpItem]
</span><a href="GHC.Core.Class.html#cls_ops"><span class="hs-identifier hs-var">cls_ops</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836724"><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836724"><span class="hs-identifier hs-var">op_stuff</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836724"><span class="hs-identifier hs-var">op_stuff</span></a></span><span>
</span><span id="line-281"></span><span class="annot"><a href="GHC.Core.Class.html#classOpItems"><span class="hs-identifier hs-var">classOpItems</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-282"></span><span>
</span><span id="line-283"></span><span class="annot"><a href="GHC.Core.Class.html#classATs"><span class="hs-identifier hs-type">classATs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-284"></span><span id="classATs"><span class="annot"><span class="annottext">classATs :: Class -&gt; [TyCon]
</span><a href="GHC.Core.Class.html#classATs"><span class="hs-identifier hs-var hs-var">classATs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_ats :: ClassBody -&gt; [ClassATItem]
</span><a href="GHC.Core.Class.html#cls_ats"><span class="hs-identifier hs-var">cls_ats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836723"><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836723"><span class="hs-identifier hs-var">at_stuff</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-285"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680836722"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ATI"><span class="hs-identifier hs-type">ATI</span></a></span><span> </span><span id="local-6989586621680836722"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680836722"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe (PredType, ATValidityInfo)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836723"><span class="hs-identifier hs-var">at_stuff</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-286"></span><span class="annot"><a href="GHC.Core.Class.html#classATs"><span class="hs-identifier hs-var">classATs</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="annot"><a href="GHC.Core.Class.html#classATItems"><span class="hs-identifier hs-type">classATItems</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier hs-type">ClassATItem</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-289"></span><span id="classATItems"><span class="annot"><span class="annottext">classATItems :: Class -&gt; [ClassATItem]
</span><a href="GHC.Core.Class.html#classATItems"><span class="hs-identifier hs-var hs-var">classATItems</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_ats :: ClassBody -&gt; [ClassATItem]
</span><a href="GHC.Core.Class.html#cls_ats"><span class="hs-identifier hs-var">cls_ats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836721"><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836721"><span class="hs-identifier hs-var">at_stuff</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-290"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836721"><span class="hs-identifier hs-var">at_stuff</span></a></span><span>
</span><span id="line-291"></span><span class="annot"><a href="GHC.Core.Class.html#classATItems"><span class="hs-identifier hs-var">classATItems</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="annot"><a href="GHC.Core.Class.html#classSCTheta"><span class="hs-identifier hs-type">classSCTheta</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PredType"><span class="hs-identifier hs-type">PredType</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-294"></span><span id="classSCTheta"><span class="annot"><span class="annottext">classSCTheta :: Class -&gt; [PredType]
</span><a href="GHC.Core.Class.html#classSCTheta"><span class="hs-identifier hs-var hs-var">classSCTheta</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cls_sc_theta :: ClassBody -&gt; [PredType]
</span><a href="GHC.Core.Class.html#cls_sc_theta"><span class="hs-identifier hs-var">cls_sc_theta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836720"><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836720"><span class="hs-identifier hs-var">theta_stuff</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-295"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836720"><span class="hs-identifier hs-var">theta_stuff</span></a></span><span>
</span><span id="line-296"></span><span class="annot"><a href="GHC.Core.Class.html#classSCTheta"><span class="hs-identifier hs-var">classSCTheta</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span class="annot"><a href="GHC.Core.Class.html#classTvsFds"><span class="hs-identifier hs-type">classTvsFds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-299"></span><span id="classTvsFds"><span class="annot"><span class="annottext">classTvsFds :: Class -&gt; ([TyVar], [FunDep TyVar])
</span><a href="GHC.Core.Class.html#classTvsFds"><span class="hs-identifier hs-var hs-var">classTvsFds</span></a></span></span><span> </span><span id="local-6989586621680836719"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836719"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var hs-var">classTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836719"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Class -&gt; [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var hs-var">classFunDeps</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836719"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span class="annot"><a href="GHC.Core.Class.html#classHasFds"><span class="hs-identifier hs-type">classHasFds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-302"></span><span id="classHasFds"><span class="annot"><span class="annottext">classHasFds :: Class -&gt; Bool
</span><a href="GHC.Core.Class.html#classHasFds"><span class="hs-identifier hs-var hs-var">classHasFds</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classFunDeps :: Class -&gt; [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var">classFunDeps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836718"><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836718"><span class="hs-identifier hs-var">fds</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FunDep TyVar] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836718"><span class="hs-identifier hs-var">fds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span class="annot"><a href="GHC.Core.Class.html#classBigSig"><span class="hs-identifier hs-type">classBigSig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PredType"><span class="hs-identifier hs-type">PredType</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier hs-type">ClassOpItem</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-305"></span><span id="classBigSig"><span class="annot"><span class="annottext">classBigSig :: Class -&gt; ([TyVar], [PredType], [TyVar], [ClassOpItem])
</span><a href="GHC.Core.Class.html#classBigSig"><span class="hs-identifier hs-var hs-var">classBigSig</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">classTyVars :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var">classTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836717"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836717"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-306"></span><span>                    </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassBody
</span><a href="GHC.Core.Class.html#AbstractClass"><span class="hs-identifier hs-var">AbstractClass</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836717"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span class="annot"><a href="GHC.Core.Class.html#classBigSig"><span class="hs-identifier hs-var">classBigSig</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">classTyVars :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var">classTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836716"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836716"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-309"></span><span>                    </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-310"></span><span>                        </span><span class="annot"><span class="annottext">cls_sc_theta :: ClassBody -&gt; [PredType]
</span><a href="GHC.Core.Class.html#cls_sc_theta"><span class="hs-identifier hs-var">cls_sc_theta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836715"><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836715"><span class="hs-identifier hs-var">sc_theta</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-311"></span><span>                        </span><span class="annot"><span class="annottext">cls_sc_sel_ids :: ClassBody -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var">cls_sc_sel_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836714"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836714"><span class="hs-identifier hs-var">sc_sels</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-312"></span><span>                        </span><span class="annot"><span class="annottext">cls_ops :: ClassBody -&gt; [ClassOpItem]
</span><a href="GHC.Core.Class.html#cls_ops"><span class="hs-identifier hs-var">cls_ops</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836713"><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836713"><span class="hs-identifier hs-var">op_stuff</span></a></span></span><span>
</span><span id="line-313"></span><span>                    </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-314"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836716"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836715"><span class="hs-identifier hs-var">sc_theta</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836714"><span class="hs-identifier hs-var">sc_sels</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836713"><span class="hs-identifier hs-var">op_stuff</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span class="annot"><a href="GHC.Core.Class.html#classExtraBigSig"><span class="hs-identifier hs-type">classExtraBigSig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#PredType"><span class="hs-identifier hs-type">PredType</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier hs-type">ClassATItem</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#ClassOpItem"><span class="hs-identifier hs-type">ClassOpItem</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-317"></span><span id="classExtraBigSig"><span class="annot"><span class="annottext">classExtraBigSig :: Class
-&gt; ([TyVar], [FunDep TyVar], [PredType], [TyVar], [ClassATItem],
    [ClassOpItem])
</span><a href="GHC.Core.Class.html#classExtraBigSig"><span class="hs-identifier hs-var hs-var">classExtraBigSig</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">classTyVars :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var">classTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836712"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836712"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">classFunDeps :: Class -&gt; [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var">classFunDeps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836711"><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836711"><span class="hs-identifier hs-var">fundeps</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-318"></span><span>                         </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassBody
</span><a href="GHC.Core.Class.html#AbstractClass"><span class="hs-identifier hs-var">AbstractClass</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836712"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836711"><span class="hs-identifier hs-var">fundeps</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span class="annot"><a href="GHC.Core.Class.html#classExtraBigSig"><span class="hs-identifier hs-var">classExtraBigSig</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">classTyVars :: Class -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#classTyVars"><span class="hs-identifier hs-var">classTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836710"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836710"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">classFunDeps :: Class -&gt; [FunDep TyVar]
</span><a href="GHC.Core.Class.html#classFunDeps"><span class="hs-identifier hs-var">classFunDeps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836709"><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836709"><span class="hs-identifier hs-var">fundeps</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-321"></span><span>                         </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ConcreteClass"><span class="hs-identifier hs-type">ConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-322"></span><span>                             </span><span class="annot"><span class="annottext">cls_sc_theta :: ClassBody -&gt; [PredType]
</span><a href="GHC.Core.Class.html#cls_sc_theta"><span class="hs-identifier hs-var">cls_sc_theta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836708"><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836708"><span class="hs-identifier hs-var">sc_theta</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cls_sc_sel_ids :: ClassBody -&gt; [TyVar]
</span><a href="GHC.Core.Class.html#cls_sc_sel_ids"><span class="hs-identifier hs-var">cls_sc_sel_ids</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836707"><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836707"><span class="hs-identifier hs-var">sc_sels</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-323"></span><span>                             </span><span class="annot"><span class="annottext">cls_ats :: ClassBody -&gt; [ClassATItem]
</span><a href="GHC.Core.Class.html#cls_ats"><span class="hs-identifier hs-var">cls_ats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836706"><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836706"><span class="hs-identifier hs-var">ats</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cls_ops :: ClassBody -&gt; [ClassOpItem]
</span><a href="GHC.Core.Class.html#cls_ops"><span class="hs-identifier hs-var">cls_ops</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680836705"><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836705"><span class="hs-identifier hs-var">op_stuff</span></a></span></span><span>
</span><span id="line-324"></span><span>                         </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-325"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836710"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FunDep TyVar]
</span><a href="#local-6989586621680836709"><span class="hs-identifier hs-var">fundeps</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[PredType]
</span><a href="#local-6989586621680836708"><span class="hs-identifier hs-var">sc_theta</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[TyVar]
</span><a href="#local-6989586621680836707"><span class="hs-identifier hs-var">sc_sels</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621680836706"><span class="hs-identifier hs-var">ats</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621680836705"><span class="hs-identifier hs-var">op_stuff</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Core.Class.html#isAbstractClass"><span class="hs-identifier hs-type">isAbstractClass</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-328"></span><span id="isAbstractClass"><span class="annot"><span class="annottext">isAbstractClass :: Class -&gt; Bool
</span><a href="GHC.Core.Class.html#isAbstractClass"><span class="hs-identifier hs-var hs-var">isAbstractClass</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">classBody :: Class -&gt; ClassBody
</span><a href="GHC.Core.Class.html#classBody"><span class="hs-identifier hs-var">classBody</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClassBody
</span><a href="GHC.Core.Class.html#AbstractClass"><span class="hs-identifier hs-var">AbstractClass</span></a></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-329"></span><span class="annot"><a href="GHC.Core.Class.html#isAbstractClass"><span class="hs-identifier hs-var">isAbstractClass</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Class-instances]{Instance declarations for @Class@}
*                                                                      *
************************************************************************

We compare @Classes@ by their keys (which include @Uniques@).
-}</span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-342"></span><span>    </span><span id="local-6989586621680836698"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836698"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span id="local-6989586621680836697"><span class="annot"><span class="annottext">== :: Class -&gt; Class -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span id="local-6989586621680836696"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836696"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836698"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836696"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-343"></span><span>    </span><span id="local-6989586621680836694"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836694"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span id="local-6989586621680836693"><span class="annot"><span class="annottext">/= :: Class -&gt; Class -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">/=</span></span></span><span> </span><span id="local-6989586621680836691"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836691"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836694"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836691"><span class="hs-identifier hs-var">c2</span></a></span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-346"></span><span>    </span><span id="local-6989586621680836687"><span class="annot"><span class="annottext">getUnique :: Class -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span id="local-6989586621680836685"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836685"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Unique
</span><a href="GHC.Core.Class.html#classKey"><span class="hs-identifier hs-var hs-var">classKey</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836685"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-347"></span><span>
</span><span id="line-348"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680836683"><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-349"></span><span>    </span><span id="local-6989586621680836680"><span class="annot"><span class="annottext">getName :: Class -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var hs-var hs-var hs-var">getName</span></a></span></span><span> </span><span id="local-6989586621680836678"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836678"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; Name
</span><a href="GHC.Core.Class.html#className"><span class="hs-identifier hs-var hs-var">className</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836678"><span class="hs-identifier hs-var">clas</span></a></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680836675"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-352"></span><span>    </span><span id="local-6989586621680836671"><span class="annot"><span class="annottext">ppr :: Class -&gt; SDoc
</span><a href="#local-6989586621680836671"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680836670"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836670"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680836670"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-353"></span><span>
</span><span id="line-354"></span><span class="annot"><a href="GHC.Core.Class.html#pprDefMethInfo"><span class="hs-identifier hs-type">pprDefMethInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#DefMethInfo"><span class="hs-identifier hs-type">DefMethInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-355"></span><span id="pprDefMethInfo"><span class="annot"><span class="annottext">pprDefMethInfo :: DefMethInfo -&gt; SDoc
</span><a href="GHC.Core.Class.html#pprDefMethInfo"><span class="hs-identifier hs-var hs-var">pprDefMethInfo</span></a></span></span><span> </span><span class="annot"><span class="annottext">DefMethInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>   </span><span class="hs-comment">-- No default method</span><span>
</span><span id="line-356"></span><span class="annot"><a href="GHC.Core.Class.html#pprDefMethInfo"><span class="hs-identifier hs-var">pprDefMethInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680836668"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836668"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DefMethSpec PredType
</span><a href="GHC.Types.Basic.html#VanillaDM"><span class="hs-identifier hs-var">VanillaDM</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Default method&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836668"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-357"></span><span class="annot"><a href="GHC.Core.Class.html#pprDefMethInfo"><span class="hs-identifier hs-var">pprDefMethInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680836665"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836665"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#GenericDM"><span class="hs-identifier hs-type">GenericDM</span></a></span><span> </span><span id="local-6989586621680836663"><span class="annot"><span class="annottext">PredType
</span><a href="#local-6989586621680836663"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Generic default method&quot;</span></span><span>
</span><span id="line-358"></span><span>                                          </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680836665"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dcolon"><span class="hs-identifier hs-var">dcolon</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PredType -&gt; SDoc
</span><a href="GHC.Core.TyCo.Ppr.html#pprType"><span class="hs-identifier hs-var">pprType</span></a></span><span> </span><span class="annot"><span class="annottext">PredType
</span><a href="#local-6989586621680836663"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span id="local-6989586621680836892"><span class="annot"><a href="GHC.Core.Class.html#pprFundeps"><span class="hs-identifier hs-type">pprFundeps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680836892"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680836892"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-361"></span><span id="pprFundeps"><span class="annot"><span class="annottext">pprFundeps :: forall a. Outputable a =&gt; [FunDep a] -&gt; SDoc
</span><a href="GHC.Core.Class.html#pprFundeps"><span class="hs-identifier hs-var hs-var">pprFundeps</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-362"></span><span class="annot"><a href="GHC.Core.Class.html#pprFundeps"><span class="hs-identifier hs-var">pprFundeps</span></a></span><span> </span><span id="local-6989586621680836659"><span class="annot"><span class="annottext">[FunDep a]
</span><a href="#local-6989586621680836659"><span class="hs-identifier hs-var">fds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#vbar"><span class="hs-identifier hs-var">vbar</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FunDep a -&gt; SDoc) -&gt; [FunDep a] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FunDep a -&gt; SDoc
forall a. Outputable a =&gt; FunDep a -&gt; SDoc
</span><a href="GHC.Core.Class.html#pprFunDep"><span class="hs-identifier hs-var">pprFunDep</span></a></span><span> </span><span class="annot"><span class="annottext">[FunDep a]
</span><a href="#local-6989586621680836659"><span class="hs-identifier hs-var">fds</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span id="local-6989586621680836888"><span class="annot"><a href="GHC.Core.Class.html#pprFunDep"><span class="hs-identifier hs-type">pprFunDep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680836888"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#FunDep"><span class="hs-identifier hs-type">FunDep</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680836888"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-365"></span><span id="pprFunDep"><span class="annot"><span class="annottext">pprFunDep :: forall a. Outputable a =&gt; FunDep a -&gt; SDoc
</span><a href="GHC.Core.Class.html#pprFunDep"><span class="hs-identifier hs-var hs-var">pprFunDep</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680836651"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680836651"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680836650"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680836650"><span class="hs-identifier hs-var">vs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[a] -&gt; SDoc
forall a. Outputable a =&gt; [a] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#interppSP"><span class="hs-identifier hs-var">interppSP</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680836651"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#arrow"><span class="hs-identifier hs-var">arrow</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; SDoc
forall a. Outputable a =&gt; [a] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#interppSP"><span class="hs-identifier hs-var">interppSP</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621680836650"><span class="hs-identifier hs-var">vs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680836621"><span id="local-6989586621680836623"><span id="local-6989586621680836625"><span id="local-6989586621680836627"><span id="local-6989586621680836629"><span id="local-6989586621680836631"><span id="local-6989586621680836633"><span id="local-6989586621680836635"><span id="local-6989586621680836637"><span id="local-6989586621680836639"><span id="local-6989586621680836644"><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data.Data</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-368"></span><span>    </span><span class="hs-comment">-- don't traverse?</span><span>
</span><span id="line-369"></span><span>    </span><span id="local-6989586621680836619"><span class="annot"><span class="annottext">toConstr :: Class -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">toConstr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr
</span><a href="GHC.Utils.Misc.html#abstractConstr"><span class="hs-identifier hs-var">abstractConstr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Class&quot;</span></span><span>
</span><span id="line-370"></span><span>    </span><span id="local-6989586621680836614"><span class="annot"><span class="annottext">gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c Class
</span><a href="../../base/src/Data.Data.html#gunfold"><span class="hs-identifier hs-var hs-var hs-var hs-var">gunfold</span></a></span></span><span> </span><span class="annot"><span class="annottext">forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">forall r. r -&gt; c r
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr -&gt; c Class
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;gunfold&quot;</span></span><span>
</span><span id="line-371"></span><span>    </span><span id="local-6989586621680836611"><span class="annot"><span class="annottext">dataTypeOf :: Class -&gt; DataType
</span><a href="../../base/src/Data.Data.html#dataTypeOf"><span class="hs-identifier hs-var hs-var hs-var hs-var">dataTypeOf</span></a></span></span><span> </span><span class="annot"><span class="annottext">Class
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DataType
</span><a href="../../base/src/Data.Data.html#mkNoRepType"><span class="hs-identifier hs-var">mkNoRepType</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Class&quot;</span></span><span>
</span><span id="line-372"></span></pre></body></html>